//o.default(t, e.data)
// '3c91be4ffd634cf028e4'
// u = r.default(t, e.data, s.default());
// '66dd65b984aaf779f4648420295c2009e6bb9985f4ea9c28690c1cc11734fd6b56364fdcdd74d6bac5f83ac85059e7b487701d2ffead02c609f82c4e36ce2eee'
//t="/api/usersearch/getfilterlist?type=2"
//e.data={}


//t = e.url.replace(e.baseURL, "")
//iLAgiLklNklLN8QiBl4kgi4lNigk4B4lAllviLAgiLklNklLN8QiBl4kgi4lNigk4B4lAllv
//iLAgiLklNirkBLvNlLW86Lv4iLAgiLklNirkBLvNlLW86Lv4

// e.headers[i] = u
//i 是 hmacSha512算法 转小写 取8到20位

const CryptoJS = require("crypto-js");

function aa() {
    a = {
        "n": 20,
        "codes": {
            "0": "W",
            "1": "l",
            "2": "k",
            "3": "B",
            "4": "Q",
            "5": "g",
            "6": "f",
            "7": "i",
            "8": "i",
            "9": "r",
            "10": "v",
            "11": "6",
            "12": "A",
            "13": "K",
            "14": "N",
            "15": "k",
            "16": "4",
            "17": "L",
            "18": "1",
            "19": "8"
        }
    }
    for (var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "/").toLowerCase(), t = e + e, n = "", i = 0; i < t.length; ++i) {
        var o = t[i].charCodeAt() % a.n;
        n += a.codes[o]
    }
    return n
}

var r1 = function (e, t) {
    return CryptoJS.HmacSHA512(e, t).toString();
};
bb = function () {
    var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
        , t = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "/").toLowerCase()
        , n = JSON.stringify(e).toLowerCase();
    return (0,
        r1)(t + n, (0,
        aa)(t)).toLowerCase().substr(8, 20)
}


t = "/api/search/searchmulti"
data = {
        "searchKey": "小米",
        "pageIndex": 3,
        "pageSize": 20
    }
console.log(bb(t,data))
//15485c17ca2bab471776
//15485c17ca2bab471776

//u参数逆向 e.headers[i] = u
p = function () {
    var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
        , t = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : ""
        , n = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "/").toLowerCase()
        , r = JSON.stringify(e).toLowerCase();
    return r1(n + "pathString" + r + a, aa(n))
};
function xxx(t,e){
        t1 = t
    i= bb(t,e)

    e1 = e

    a ='724c4a5e69b718287e324efd7b19f645'
    u=p(t1, e1, a)
    // console.log(i)
    console.log(u);

    return {
        'key': i,
        'value': u
    }

}


xxx(t,data)





//66dd65b984aaf779f4648420295c2009e6bb9985f4ea9c28690c1cc11734fd6b56364fdcdd74d6bac5f83ac85059e7b487701d2ffead02c609f82c4e36ce2eee